<?php
/*
*会员查询
*/
namespace Admin\Func;

class Func909010105 {
    var  $db;
    var $rst;
    var $errmsg;
    var  $VIPLoginCode;
    var  $VIPName;
    var  $VIPNickName;
    var  $VIPPhoneNo;
    var  $Sex;
    var  $BirthDay;
    var  $Mail;
    var  $VIPType;
    var  $VIPLevel;

    public function __construct($VIPLoginCode,$VIPName,$VIPNickName,$VIPPhoneNo,$Sex,$BirthDay,$Mail,$VIPType,$VIPLevel) {
        $this->db  = new \Think\Model();
        $this->errmsg = '';
        $this->VIPLoginCode = addslashes($VIPLoginCode);
        $this->VIPName = addslashes($VIPName);
        $this->VIPNickName = addslashes($VIPNickName);
        $this->VIPPhoneNo = addslashes($VIPPhoneNo);
        $this->Sex = addslashes($Sex);
        $this->BirthDay = addslashes($BirthDay);
        $this->Mail = addslashes($Mail);
        $this->VIPType = addslashes($VIPType);
        $this->VIPLevel = addslashes($VIPLevel);

    }
    /*
    *获取错误信息
    */
    public function getErrMsg() {
        return $this->errmsg;
    }
    /*
    *验证
    */
    private function validate(){
        return true;
    }
    /*
    *执行
    */
    public function execute(){
        $vflag = true;
        $OperID = I('OperID');
        if($this->validate()){
/*
            $sql = <<<EOD
SELECT * FROM t_lz_vs_viper_basic T WHERE 1=1  AND T.VIPLoginCode = '$this->VIPLoginCode' 
 AND T.VIPName = '$this->VIPName' 
 AND T.VIPNickName = '$this->VIPNickName' 
 AND T.VIPPhoneNo = '$this->VIPPhoneNo' 
 AND T.Sex = '$this->Sex' 
 AND T.BirthDay = '$this->BirthDay' 
 AND T.Mail = '$this->Mail' 
 AND T.VIPType = '$this->VIPType' 
 AND T.VIPLevel = '$this->VIPLevel' 

EOD;
*/
              $sql = <<<EOD
SELECT * FROM t_lz_vs_viper_basic T

EOD;
 
            $this->rst = $this->db->query($sql);
           // $this->rst = $this->db->execute($sql);
            if ($this->rst === false){
                $this->errmsg = $this->db->getDbError();
                $vflag = false;
            }else{
                $vflag = true;  
            }
        }else{
            $vflag = false;
        }
    return  $vflag;
    }
    public function getRst(){
        return $this->rst;
    }
}
